import request from '@/utils/request'

// 查询外呼号码配置列表
export function listOutphoneno(query) {
  return request({
    url: '/crm/outphoneno/list',
    method: 'get',
    params: query
  })
}

// 查询外呼号码配置详细
export function getOutphoneno(id) {
  return request({
    url: '/crm/outphoneno/' + id,
    method: 'get'
  })
}

// 新增外呼号码配置
export function addOutphoneno(data) {
  return request({
    url: '/crm/outphoneno',
    method: 'post',
    data: data
  })
}

// 修改外呼号码配置
export function updateOutphoneno(data) {
  return request({
    url: '/crm/outphoneno',
    method: 'put',
    data: data
  })
}

// 删除外呼号码配置
export function delOutphoneno(id) {
  return request({
    url: '/crm/outphoneno/' + id,
    method: 'delete'
  })
}
// 获取外显号码
export function getShowPhoneNo(query) {
  return request({
    url: '/crm/outphoneno/getShowPhoneNo',
    method: 'get',
    params: query
  })
}

// 获取部门外显号码列表
export function getShowPhoneNoByDeptId(query) {
  return request({
    url: '/crm/outphoneno/getShowPhoneNoByDeptId',
    method: 'get',
    params: query
  })
}
// 获取部门外显号码列表-侧边栏
export function getShowPhoneNoSabar(query) {
  return request({
    url: '/crm/outphoneno/getShowPhoneNoSabar',
    method: 'get',
    params: query
  })
}
// 清除外显号码
export function clearShowPhoneIndex(query) {
  return request({
    url: '/crm/outphoneno/clearShowPhoneIndex',
    method: 'get',
    params: query
  })
}
